<template>
  <div class="wrapper">
        <el-radio-group v-model="diagnosisType" class="diagnosis-type" size="small">
        <template v-for="item in diagnosisList">
          <el-radio-button
            @click.native="handleClickTab(item)"
            :key="item.type"
            :label="item.type">
          {{ item.name }}
        </el-radio-button>
        </template>
      </el-radio-group>
        <el-card class="box-card">
          <router-view :key="$route.name"></router-view>
       </el-card>
  </div>
</template>

<script>
export default {
  name: 'iAmSecondMatch',
  components: {},
  props: {},
  data() {
    return {
      diagnosisType: '',
      diagnosisList: [
        {
          type: 'western',
          name: '西药'
        },
        {
          type: 'chinese-pieces',
          name: '中药饮片'
        },
        {
          type: 'chinese-granules',
          name: '中药颗粒'
        }
      ],
    };
  },
  watch: {
  },
  computed: {},
  methods: {
    handleClickTab (item) {
      console.log(item);
        this.$router.push({ 
          path: '/clinic/prescription-nv/'+item.type
        });
    },
  },
  created() {},
  mounted() {}
};
</script>
<style scoped>
.wrapper{}
</style>